﻿using iTelluro.Explorer.Infrastructure.CrossCutting.Logging;
using iTelluro.Explorer.Infrastructure.CrossCutting.NetFramework.Logging;
using Quartz;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SXMeteorological.DataSyn.RaderPic
{
  public  class RadarPicJob:IJob
    {
       private readonly ILogger _logger;
       public RadarPicJob()
        {
            _logger = LoggerFrameFactory.CreateLog();
           // _logger.LogInfo("执行雷达图片存储构造函数");
        }


        public void Execute(IJobExecutionContext context)
        {
            RadarPicSave290();
            RadarPicSave911();
            RadarPicSave912();
            RadarPicSave917();
            RadarPicSave916();
            RadarPicSave915();
            RadarPicSave914();
        }
        /// <summary>
        /// 雷达图片存储
        /// </summary>
        private void RadarPicSave290()
        {
            try
            {
               
                RadarPic.GETIMG("290");
             
            }
            catch (Exception ex)
            {
                _logger.LogError(string.Format("雷达图片存储失败#{0}：{1}", DateTime.Now, ex.Message));
            }
        }

        private void RadarPicSave911()
        {
            try
            {
                
                RadarPic.GETIMG( "911");
             
            }
            catch (Exception ex)
            {
                _logger.LogError(string.Format("雷达图片存储失败#{0}：{1}", DateTime.Now, ex.Message));
            }
        }
        private void RadarPicSave912()
        {
            try
            {
               
                RadarPic.GETIMG("912");
              
            }
            catch (Exception ex)
            {
                _logger.LogError(string.Format("雷达图片存储失败#{0}：{1}", DateTime.Now, ex.Message));
            }
        }

        private void RadarPicSave917()
        {
            try
            {
            
                RadarPic.GETIMG( "917");
       
            }
            catch (Exception ex)
            {
                _logger.LogError(string.Format("雷达图片存储失败#{0}：{1}", DateTime.Now, ex.Message));
            }
        }
        private void RadarPicSave916()
        {
            try
            {
                
                RadarPic.GETIMG("916");
               
            }
            catch (Exception ex)
            {
                _logger.LogError(string.Format("雷达图片存储失败#{0}：{1}", DateTime.Now, ex.Message));
            }
        }
        private void RadarPicSave915()
        {
            try
            {
                        
                RadarPic.GETIMG("915");
                
            }
            catch (Exception ex)
            {
                _logger.LogError(string.Format("雷达图片存储失败#{0}：{1}", DateTime.Now, ex.Message));
            }
        }
        private void RadarPicSave914()
        {
            try
            {
               
                RadarPic.GETIMG("914");
            }
            catch (Exception ex)
            {
                _logger.LogError(string.Format("雷达图片存储失败#{0}：{1}", DateTime.Now, ex.Message));
            }
        }
    }
}
